package cn.ecut.dzy.objecthead;

import org.openjdk.jol.info.ClassLayout;

/**
 * @program: juc
 * @description:
 * @author: DingZhenYun
 * @create: 2021-10-28 14:00
 **/
class MyTest{

}
public class ObjectHeadDemo {
    public static void main(String[] args) {
        Object o=new Object();
        //引入了JOL，直接使用
        System.out.println(ClassLayout.parseInstance(new MyTest()).toPrintable());

//        //java5之前 只有重量级锁
//        new Thread(() -> {
//            synchronized (object){
//                System.out.println("----hello juc");
//            }
//        },"t1").start();
    }
}
